/********************************************************************
* Copyright (c) 2013,TGS,All rights reserved.
* fileName:	PolylineEntity.h	
* created:	2013/07/24 16:11

* version:	1.6
* detail: 
*********************************************************************/

#pragma once

#include "DxfEntity.h"
#include <TGS/GeoMath2.0/Polygon.h>

class PolylineEntity : public DxfEntity
{
public:
	typedef TGS::GeoMath::Polygon Polygon;
	typedef TGS::GeoMath::Point Point;
public:
	PolylineEntity(void);
	~PolylineEntity(void);
public:
	void addPoint(double x, double y) { _polyline.appendPoint(x, y); }
	void addPoint(const Point& point) { _polyline.appendPoint(point); }
	const Polygon& getPolyline() const { return _polyline; }
	void setPolyline(Polygon val) { _polyline = val; }
public:
	virtual Envelope getEnvelope() const;
	virtual void render(RenderContext* renderContext);
	virtual void traslate(const Point& point);
private:
	Polygon	_polyline;
	
};

